package com.ccb.sc.common.modules.live.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ccb.sc.common.modules.live.entity.LiveStreamingReserve;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author ken
 * @version 1.0
 * @date 2022/8/27 15:19
 */
public interface LiveStreamingReserveMapper extends BaseMapper<LiveStreamingReserve> {


    @Select("select count(1) from (select count(1) from tb_live_streaming_reserve where deleted=0 and member_id = #{memberId} group by live_id) a")
    int selectReserveCount(@Param("memberId") Long memberId);

}
